/**/


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#include <vector>

class Solution {  
public:  
    vector<int> twoSum(vector<int> &numbers, int target) {  
        int i, sum;  
        vector<int> results;  
        map<int, int> hmap;  
        for(i=0; i<numbers.size(); i++){  
            if(!hmap.count(numbers[i])){  
                hmap.insert(pair<int, int>(numbers[i], i));  
            }  
            if(hmap.count(target-numbers[i])){  
                int n=hmap[target-numbers[i]];  
                if(n<i){  
                    results.push_back(n+1);  
                    results.push_back(i+1);  
                    cout<<n+1<<", "<<i+1<<endl;  
                    return results;  
                }  
  
            }  
        }  
        return results;  
    }  
};  

int main()
{
	int num[] = {-1,-2,-3,-4,-5};
	int target = -8;
	int twoNum[2];
	Solution sol;
	sol.twoSum(num, 5, target);
	return 0;
}